import request from '@/utils/request'
export function fetchList(parentId,params) {
  return request({
    url:'/api/v1/product/category/findPmsProductCategory?parentId='+parentId,
    method:'post',
    params:params
  })
}
export function deleteProductCate(id) {
  return request({
    url:'/api/v1/product/category/deletePmsProductCategory/'+id,
    method:'get'
  })
}

export function createProductCate(data) {
  return request({
    url:'/api/v1/product/category/addPmsProductCategory',
    method:'post',
    data:data
  })
}

export function updateProductCate(id,data) {
  return request({
    url:'/api/v1/product/category/updatePmsProductCategory/',
    method:'post',
    data:data
  })
}

export function getProductCate(id) {
  return request({
    url:'/api/v1/product/category/getPmsProductCategoryById/'+id,
    method:'get',
  })
}

export function updateShowStatus(data) {
  return request({
    url:'/api/v1/product/category/updateStatus',
    method:'post',
    data:data
  })
}

export function updateNavStatus(data) {
  return request({
    url:'/api/v1/product/category/updateStatus',
    method:'post',
    data:data
  })
}

export function fetchListWithChildren() {
  return request({
    url:'/api/v1/product/category/findPmsProductCategoryBYLever?pageSize=100000&pageNum=1',
    method:'post'
  })
}
